package demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import javax.tools.Tool;
import java.io.Serializable;

public class Worker implements Serializable {

    private String name = "强子";

    @Autowired
    @Qualifier("saw")
    private Tool tool;

    public void work(){
        System.out.printf(name+"使用"+tool);
    }


}
